package com.itheima.mapper;

import com.baomidou.mybatisplus.core.injector.methods.SelectById;
import com.itheima.entity.dto.shoppingcart.ShoppingCartSubDto;
import com.itheima.entity.pojo.ShoppingCart;
import com.itheima.entity.vo.order.OrderDetailsVo;
import com.itheima.entity.vo.shoppingcart.ShoppingCartAddVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author huangzelnag
 * @create 2022-05-12
 */
@Mapper
public interface ShoppingCartMapper {

    List<ShoppingCart> SelectByUserId(String userId);


    ShoppingCart countByDishId(String dishId, String userId);

    Boolean upById(ShoppingCart shoppingCart);

    ShoppingCartAddVo selectById(String id);

    void insert(ShoppingCart shoppingCart);

    Boolean upBydishId(ShoppingCartSubDto shoppingCartSubDto);

    Boolean deleteById(String id);

    Boolean deleteByUserId(String userId);

    List<ShoppingCart> selectBymoeny(String userId);


}
